# -*- coding: utf-8 -*-
# @Time    : 2020/4/21 下午5:13
# @Author  : lilong

from rasa_sdk.executor import ActionExecutor


if __name__ == "__main__":
    executor = ActionExecutor()
    executor.register_package("action_lilong")
    body = [{"name": k} for k in executor.actions.keys()]
    print("ll:", executor.actions)
    print("body:", body)

    # action调用
    action_call = {"next_action": "action_check_restaurants",
                   "tracker": {"sender_id": "123",
                               "events": "",
                               "paused": "",
                               "followup_action": "",
                               "latest_action_name": ""},
                   "domain": ""}

    result = executor.run(action_call)
